from django.contrib import admin
from .models import Article

class ArticleAdmin(admin.ModelAdmin):
    prepopulated_fields = {'slug': ('title',)}
    list_display = ('title', 'created_at', 'types', 'image')
    list_filter = ('created_at', 'types',)
    search_fields = ('title', 'text')

admin.site.register(Article, ArticleAdmin)